package com.estore.dao;

import java.util.List;
import javax.sql.DataSource;

import com.estore.entity.Product;
import com.estore.entity.Categories;
import com.estore.entity.Brand;
import com.estore.info.CatInfo;
import com.estore.info.ProductInfo;

public interface Product_Dao {

	public void setDataSource(DataSource datasource);

	public Categories getCategories(Integer catID);

	public List<Categories> listSubCategories(Integer catID);

	public Brand getBrand(Integer brandID);

	public List<Brand> getListBrand();

	public List<Categories> listCategories();

	public List<Product> getListProduct(Integer catID);

	public List<Product> getListAllProduct();

	public void addProduct(ProductInfo info);

	public void addBrand(String brandName, String website);

	public boolean checkBrand(String brandName);

	public void updateBrand(Integer brandID, String brandName, String website);

	public void insertCategories(CatInfo cat);
	
	public void updateCategories(CatInfo info);
	
	public boolean checkCat(String catName);
	
	public boolean checkProduct(String productName);
	
	// get top 12 newest product with categories name, brand name and img display on homepage
	
	public List<ProductInfo> getTop12NewProduct();
}
